Data Warehouse
Tables on Data Warehouse
The data warehouse forms the backbone of our data management system, where all data is systematically stored in structured tables. Below is an overview of our table naming conventions and the types of tables within our data warehouse.
Raw tables
The raw tables store unprocessed data directly retrieved from APIs provided by the RPC service. For each EVM (Ethereum Virtual Machine) chain, we maintain four primary raw data tables:
- Block:
- Description: Contains information about the blocks of a blockchain.
- Data Source: Retrieved using the API eth_getblockbynumber with the option to fetch all transactions within the block.
- Transactions:
- Description: Stores information about blockchain transactions.
- Data Source: Extracted from the transaction data within the Block table.
- Traces:
- Description: Contains information about internal transactions. These are transactions initiated by contracts calling functions of other contracts.
- Data Source: Trace data is obtained from the trace_block API of Quicknode.
- Logs:
- Description: Stores log data emitted by transactions, useful for tracking contract-specific events.
- Data Source: Retrieved using the API eth_getlogs.
Decode Tables
Decoding raw data into meaningful information is essential for interpreting blockchain interactions. We decode raw data using the ABI (Application Binary Interface) of each protocol, resulting in two types of decoded tables:
- Call:
- Description: Decoded data from the Traces table using the corresponding ABI of protocols.
- Details: Each table contains call data of one specific call across various contracts that use the same ABI.
- Event:
- Description: Decoded data from the Logs table using the corresponding ABI of protocols.
- Details: Each table contains event data of one specific event across various contracts that use the same ABI.
Transform Tables
Transform tables are created to serve specific use cases, derived from the integration and aggregation of raw and decoded tables. On Dune, these tables are referred to within the Spellbook project. The transformation process involves joining and aggregating data to create comprehensive and actionable business tables.
- Purpose: Provide tailored data views for specific analytical purposes.
- Process: Data from raw and decoded tables are joined and aggregated to form these transform tables, enabling detailed analysis and reporting.